﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ExtensionsAPI.ContactsAPI;
using ExtensionsAPI.NetworkAPI;

namespace BleQua.Shared.Models {
	public class ContactModel : IContact {
		private DataEntities.Contact item;

		public ContactModel( ) {
			this.NID = new SocketModel( );
			this.Groups = new List<string>( );
			this.VCard = new VCardModel( );
		}

		public ContactModel(DataEntities.Contact item) {
			// TODO: Complete member initialization
			this.item = item;

			this.Nickname = item.nick;
			this.NID = new SocketModel(item.id);
			this.Groups = new List<string>(item.groups.Split(';'));
		}

		public string Nickname { get; set; }
		public ISocket NID { get; set; }
		public List<string> Groups { get; private set; }
		public IVcard VCard { get; private set; }
	}
}
